/**
 * Created by yzdd on 2018/6/3.
 */
import {observable} from 'mobx';

export class CallerRoomStore {
  @observable
  list = [];

  from(obj) {
    let preData = [];
    obj.map((v, i) => {
      preData.push(new Item().from(v))
    });
    this.list.replace(preData);
  }

  setUnSelect() {
    this.list.map((v, i) => {
      v.isSelected = false;
    })
  }
}

class Item {
  name;
  @observable
  isSelected = false;

  from(obj) {
    this.name = obj.name;
    return this;
  }

  setSelect() {
    this.isSelected = true;
  }
}